package com.douwong.student.popuwindow;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.douwong.student.R;


public class LeaderPopuwindow extends PopupWindow {

	private View view;
	private TextView leader_name;
	public LeaderPopuwindow(Context context, String leader){
		LayoutInflater inflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		view=inflater.from(context).inflate(R.layout.leader_view, null);
		leader_name=(TextView) view.findViewById(R.id.leader_name);
		leader_name.setText(leader);
		this.setContentView(view);
		this.setWidth(LayoutParams.WRAP_CONTENT);
		this.setHeight(LayoutParams.WRAP_CONTENT);		
		// 设置SelectPicPopupWindow弹出窗体可点击
		this.setFocusable(true);
		ColorDrawable dw = new ColorDrawable(0x00000000);
		this.setBackgroundDrawable(dw);
	}
}
